Hitherto, an input device including a gyro-sensor is known. Among such input devices, there is an input device which has a substantially parallelepiped shape having a longitudinal direction as a front-rear direction thereof and is sized to be able to be held by one hand. Also, a technique using such an input device as a pointing device is known. In such a technique, a pointing operation is performed while a leading end portion of the input device is directed toward a screen. It is possible to change a pointing position in a right-left direction by rotating the input device itself about an axis along the direction of gravity.
The technique described above assumes, as the input device, a device which has a substantially parallelepiped shape and is able to be held by one hand. Here, a case is assumed in which, in a pointing operation in which the input device itself is moved as described above, the input device is operated while right and left ends of a housing thereof are held (the input device is held by both hands). As an example, an input device is assumed which includes a housing having a substantially rectangular plate shape which is laterally long. A case is considered in which a pointing operation is performed while the input device is held by both hands. A case is assumed in which, as the pointing operation, a pointing operation is performed while an upper side (leading end side) of the input device is directed toward a screen. In such a case of being held by both hands, for example, when it is attempted to change a pointing position in the right-left direction, some users may perform an operation so as to direct the leading end side of the input device left or right as shown in FIG. 16, but some other users may perform an operation so as to turn the input device without changing the direction of the leading end side of the input device as shown in FIG. 17. That is, because of the holding by both hands, two ways are conceivable for performing an operation when it is desired to move the pointing position in the right-left direction. In the technique described above, in the case of the former operation, it is possible to change the pointing position right and left, but in the case where the latter operation is performed, sufficiently good operability cannot be provided to the user.
Therefore, it is a feature of the exemplary embodiments to provide a computer-readable non-transitory storage medium having an information processing program stored thereon, an information processing apparatus, an information processing system, and an information processing method, which are able to enhance operability when a pointing operation or the like is performed with a pointing device which is operated while being held by both hands. It is noted that the computer-readable storage medium include, for example, a magnetic medium such as flash memory, ROM, or RAM, or an optical medium such as CD-ROM, DVD-ROM, or DVD-RAM.
In order to attain the feature described above, the following configuration examples are exemplified.
A configuration example is a computer-readable non-transitory storage medium having stored thereon an information processing program executed by a computer of an information processing apparatus which performs a predetermined process on the basis of an output from an operation device including an angular velocity sensor. The information processing program causes the computer to function as an attitude calculator, a rotation amount change section, and a process execution section. The attitude calculator calculates an attitude of the operation device or a virtual operation device which is arranged in a virtual space and corresponds to the operation device, on the basis of an output from the angular velocity sensor. The rotation amount change section changes a rotation amount in a direction of a first axis in a coordinate system for a space in which the operation device or the virtual operation device is present, on the basis of a rotation amount about a second axis which is perpendicular to the first axis, the rotation amount in the direction of the first axis being calculated on the basis of the attitude. The process execution section performs the predetermined process on the basis of the rotation amount in the direction of the first axis which has been changed by the rotation amount change section.
According to the above configuration example, it is possible to enhance the operability of, for example, a pointing operation of performing pointing with the pointing device in a right-left direction by moving the input device itself, a cursor moving operation, or the like.
In another configuration example, the process execution section may perform the predetermined process on the basis of a rotation amount about the first axis and the rotation amount in the direction of the first axis which has been changed by the rotation amount change section.
According to the above configuration example, for example, an input in an up-down direction is also enabled in addition to the right-left direction, and it is possible to further enhance the operability.
In another configuration example, the rotation amount change section may change the rotation amount in the direction of the first axis such that the greater the rotation amount about the second axis is, the more greatly the rotation amount in the direction of the first axis is changed. Furthermore, the rotation amount change section may be configured to include a change content determination section configured to determine whether to change the rotation amount in a direction in which the rotation amount is increased or in a direction in which the rotation amount is decreased, of the direction of the first axis, in accordance with a direction of rotation about the second axis.
According to the above configuration example, it is possible to provide a more intuitive operation feeling. In addition, it is possible to determine whether to change the rotation amount in the direction in which the rotation amount is increased or in the direction in which the rotation amount is decreased, in accordance with a direction of rotation about the second axis, and a more fine operation is enabled.
In another configuration example, the operation device may include a housing which is held by right and left hands of a user so that an operation is allowed to be performed. In addition, the first axis may be an axis along a direction of rotation of the operation device when the operation device is rotated such that: when a right hand side of the housing held by the right and left hands of the user is moved in a direction away from the user as seen from the user, a left hand side of the housing is moved in a direction toward the user as seen from the user; and when the right hand side of the housing is moved in the direction toward the user as seen from the user, the left hand side of the housing is moved in the direction away from the user as seen from the user, and the second axis may be an axis which is a rotation axis when the attitude of the operation device is rotated such that: when the right hand side of the housing held by the right and left hands of the user is lifted as seen from the user, the left hand side of the housing is lowered; and when the right hand side of the housing is lowered as seen from the user, the left hand side of the housing is lifted. Furthermore, the first axis may be an axis which is perpendicular to a direction of gravity and is along a right-left direction as seen from the user, and the second axis may be an axis which is perpendicular to both the first axis and the direction of gravity.
According to the above configuration example, it is possible to further enhance the operability of the input device which is held by both hands and allows a pointing position on the screen to be changed by moving the input device itself.
In another configuration example, the predetermined process may be a pointing process of pointing to a position on a predetermined screen. Furthermore, when the rotation amount change section changes the rotation amount by using the virtual operation device, the predetermined process may be a pointing process with respect to a virtual screen arranged in the virtual space in which the virtual operation device is arranged.
According to the above configuration example, it is possible to further enhance the operability of the pointing operation.
According to the present embodiment, it is possible to further enhance the operability in pointing or the like with the pointing device which is held by both hands.